/*
 * @Author: 周鹏飞
 * @Date: 2021-06-03 17:19:16
 * @LastEditors: 周鹏飞
 * @LastEditTime: 2021-07-05 10:34:46
 * @Description: file content
 */
leftTwo = {
  title: {
    text: "事故高发路段统计",
    padding: [0, 0, 0, 30],
    textStyle: {
      color: "#fff",
      fontSize: 18,
      fontWeight: "normal"
    }
  },
  legend: {
    icon: 'roundRect',
    // 设置宽度
    itemWidth: 10,
    // 设置高度,
    itemHeight: 10,
    // 设置间距
    itemGap: 5,
    bottom: "4%",
    textStyle: {
      color: '#ffffff'//字体颜色
    },
  },
  tooltip: {

},
  dataset: {
    source: [
      // ['2012', '2013', '2014', '2015', '2016', '2017'],
      // ['内向西站', 86.5, 92.1, 85.7, 83.1, 73.4, 55.1],
      // ['product', '内乡西站', '师岗站', '渠首站', '龙堰站', '陶营站', '厚坡服务区'],
      // ['内乡西站', 41.1, 30.4, 65.1, 53.3, 83.8, 98.7],
      // ['师岗站', 41.1, 30.4, 65.1, 53.3, 83.8, 98.7],
      // ['渠首站', 24.1, 67.2, 79.5, 86.4, 65.2, 82.5],
      // ['龙堰站', 55.2, 67.1, 69.2, 72.4, 53.9, 39.1],
      // ['陶营站', 55.2, 67.1, 69.2, 72.4, 53.9, 39.1],
      // ['厚坡服务区', 55.2, 67.1, 69.2, 72.4, 53.9, 39.1]
    ]
  },
  color: ['#00ebfb', '#5af29f', '#87a0ff', '#fff476', '#a58bbd', '#c0fff2'],
  series: [
    {

      type: 'pie',
      radius: ['25%', '30%'],
      center: ['15%', '28%'],
      encode: {
        itemName: 'product',
        value: '莲花互通',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '一月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },
    },
    {


      type: 'pie',
      radius: ['25%', '30%'],
      center: ['47%', '28%'],
      encode: {
        itemName: 'product',
        value: 'K65-K60下行',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '二月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },

      // No encode specified, by default, it is '2012'.
    },
    {

      type: 'pie',
      radius: ['25%', '30%'],
      center: ['80%', '28%'],
      encode: {
        itemName: 'product',
        value: '渠首站',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '三月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },

      // No encode specified, by default, it is '2012'.
    },
    {

      type: 'pie',
      radius: ['25%', '30%'],
      center: ['15%', '65%'],
      encode: {
        itemName: 'product',
        value: 'K70-K65上行',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '四月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },

      // No encode specified, by default, it is '2012'.
    },
    {
      type: 'pie',
      radius: ['25%', '30%'],
      center: ['47%', '65%'],
      encode: {
        itemName: 'product',
        value: 'K70-K65下行',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '五月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },

      // No encode specified, by default, it is '2012'.
    },
    {

      type: 'pie',
      radius: ['25%', '30%'],
      center: ['80%', '65%'],
      encode: {
        itemName: 'product',
        value: '桑庄互通',
      },
      label: {
        normal: {
          show: true,
          position: 'center',
          color: '#c4d0dc',
          fontSize: 12,
          fontWeight: 'normal',
          formatter: '六月'

        },
      },
      labelLine: {
        normal: {
          show: false
        }
      },

      // No encode specified, by default, it is '2012'.
    },

  ],



};
function getAccident(){
  $.ajax({
    type: 'get',
    url: httpUrl + 'event/eventProvisionalStatistics/getProvisionStatistics/111',
    data: "",
    dataType: 'json',
    contentType: "application/json",
    headers: {
      Authorization: localStorage.getItem('token')
    },
    success: function (res) {
      var myChart2 = echarts.init(document.getElementById('Eleft_two'));
      leftTwo.dataset.source=res.data.content  
      myChart2.setOption(leftTwo)
    },
    error: function (err) {
      vm.$message({
        message: '查询失败请稍后再试,或与管理员联系',
        type: 'error'
      });
    }
  })
}